package com.gnerv.author.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gnerv.author.entity.ArticleStatistics;
import com.gnerv.author.mapper.ArticleStatisticsMapper;
import com.gnerv.author.service.IArticleStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 博客平台-文章统计表 服务实现类
 * </p>
 *
 * @author Gnerv LiGen
 * @since 2019-08-07
 */
@Service
public class ArticleStatisticsServiceImpl extends ServiceImpl<ArticleStatisticsMapper, ArticleStatistics> implements IArticleStatisticsService {

    @Autowired
    ArticleStatisticsMapper articleStatisticsMapper;

    @Override
    public boolean createBlogArticleStatistics(ArticleStatistics articleStatistics) {
        return true;
    }

    @Override
    public boolean deleteBlogArticleStatistics(String bId) {
        return true;
    }

    @Override
    public boolean updateBlogArticleStatistics(ArticleStatistics articleStatistics) {
        return true;
    }

    @Async
    @Override
    public boolean updateBlogArticleStatisticsByClick(String aId, int i) {
        articleStatisticsMapper.updateBlogArticleStatisticsByClick(aId);
        return true;
    }

    @Async
    @Override
    public boolean updateBlogArticleStatisticsByForward(String aId, int i) {
        return true;
    }

    @Async
    @Override
    public boolean updateBlogArticleStatisticsByComment(String aId, int i) {
        return true;
    }

    @Override
    public ArticleStatistics selectBlogArticleStatistics(String bId) {
        return null;
    }

    @Override
    public List<ArticleStatistics> listBlogArticleStatistics(ArticleStatistics articleStatistics) {
        return null;
    }
}
